package iut.acy.infoquizz;



import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.Spinner;
import android.widget.TextView;
import android.support.v4.app.NavUtils;

public class ChoixMatiere extends Activity implements OnClickListener{
	
	private Spinner spinChoix;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.choix_matiere);
        spinChoix = (Spinner) findViewById(R.id.spinChoix);
        // Create an ArrayAdapter using the string array and a default spinner layout
        ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(this,R.array.matieres, android.R.layout.simple_spinner_item);
        // Specify the layout to use when the list of choices appears
        adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
        // Apply the adapter to the spinner
        spinChoix.setAdapter(adapter);
           
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.activity_info_quizz, menu);
        return true;
    }

	public void onClick(View v) {
		// TODO Auto-generated method stub
		 Intent intent = new Intent();
         setResult(RESULT_OK, intent);
         finish();
		
	}

    
}
